home *** CD-ROM | disk | FTP | other *** search
Wrap
<% '+------------------------------------------------------------------------- ' ' Microsoft Windows Media ' Copyright (C) Microsoft Corporation. All rights reserved. ' ' File: pagebanner.inc ' ' Contents: Responsible for drawing the page banner of each ASP Admin page ' ' Dependencies: locStrings.inc, wmsConstants.inc, toolbar.inc ' '-------------------------------------------------------------------------- Dim g_strNowPlayingPath Dim g_bBroadcastStreamingHasEnded g_strNowPlayingPath = "" g_bBroadcastStreamingHasEnded = FALSE '///////////////////////////////////////////////////////////////////////////////////////// sub DrawPPNameBanner( strTabName ) Dim dwPPType Dim strAdjustedName Dim bAllowingConnections Dim bBroadcastPubPoint Dim dwPPStatus Dim strStatusMsg Dim bInError Dim bIsPush Dim bDrawWarning Dim bBroadcastPPStarted Dim strPPPath on error resume next if( WMS_SERVICE_STARTED <> g_dwConnectionFailureCode ) then Response.Redirect( "include/server_stopped.asp?server=" & qs("server") ) end if dwPPType = g_objPubPoint.Type strAdjustedName = Server.HTMLEncode( ConvertPPName( g_strPubPointName, dwPPType ) ) bAllowingConnections = g_objPubPoint.AllowClientsToConnect dwPPStatus = 0 strStatusMsg = "" bInError = FALSE bIsPush = FALSE bDrawWarning = FALSE bBroadcastPPStarted = FALSE bBroadcastPubPoint = FALSE dwPPStatus = g_objPubPoint.Status bInError = CBool( ( WMS_PUBLISHING_POINT_ERROR_CRITICAL and dwPPStatus ) ) or ( WMS_PUBLISHING_POINT_ERROR and dwPPStatus ) if WMS_PUBLISHING_POINT_TYPE_BROADCAST = dwPPType then bBroadcastPubPoint = TRUE dwPPStatus = g_objPubPoint.BroadcastStatus bBroadcastPPStarted = ( 0 <> ( WMS_BROADCAST_PUBLISHING_POINT_STARTED and dwPPStatus ) ) strPPPath = g_objPubPoint.Path if( 0 = strcomp( Left( strPPPath, 5 ), "push:" ) ) then bIsPush = TRUE end if end if if( bInError ) then strStatusMsg = L_PPINERROR_TEXT elseif bBroadcastPubPoint then if bBroadcastPPStarted then if bAllowingConnections then Dim objSharedPlaylist Dim objCurrentEntry Dim objActiveMedia Dim bEndOfStream Dim strPPSrc Dim bPlaylist Dim enumFileType bEndOfStream = FALSE bPlaylist = FALSE err.clear if( ( not bIsPush ) and ( 0 = err.number ) ) then if( 0 = Len( strPPPath ) ) then strPPPath = g_objPubPoint.Path end if on error resume next if( ( 0 = StrComp( Left( strPPPath, 6 ), "mcast:" ) ) or _ ( 0 = StrComp( Right( strPPPath, 4 ), ".nsc" ) ) ) then enumFileType = WMS_FILE_STREAM_FORMAT else enumFileType = g_objServer.FileType( strPPPath ) end if if( ( 0 = err.Number ) and ( WMS_FILE_DIRECTORY = enumFileType ) or ( WMS_FILE_PLAYLIST = enumFileType ) )then Set objSharedPlaylist = g_objPubPoint.SharedPlaylist if( IsEmpty( objSharedPlaylist ) or ( 0 <> err.number ) )then err.clear bEndOfStream = TRUE else on error resume next Set objCurrentEntry = objSharedPlaylist.CurrentPlaylistEntry strRuntimeID = objCurrentEntry.GetAttribute( "uniqueRuntimeID" ) if( 0 <> err.number )then err.clear bEndOfStream = TRUE else Set objActiveMedia = objSharedPlaylist.CurrentMediaInformation if( 0 <> err.number )then err.clear bEndOfStream = TRUE else g_strNowPlayingPath = objActiveMedia.GetProperty( "WMS_CONTAINER_LOG_PHYSICAL_URL","" ) if( ( 0 <> err.number ) or ( 0 = Len( g_strNowPlayingPath ) ) )then err.clear bEndOfStream = TRUE end if end if end if end if end if end if if( bEndOfStream ) then g_bBroadcastStreamingHasEnded = TRUE strStatusMsg = L_STARTEDBUTENDED_TEXT else if WMS_BROADCAST_PUBLISHING_POINT_ARCHIVING and dwPPStatus then strStatusMsg = L_PPISSTARTEDARCH_TEXT else strStatusMsg = L_PPISSTARTED_TEXT end if end if else if WMS_BROADCAST_PUBLISHING_POINT_ARCHIVING and dwPPStatus then strStatusMsg = L_PPISSTARTEDDENYARCH_TEXT else strStatusMsg = L_STARTEDBUTDENYING_TEXT end if end if else strStatusMsg = L_PPISSTOPPED_TEXT end if else if bAllowingConnections then strStatusMsg = L_STARTEDANDALLOWING_TEXT else strStatusMsg = L_DENYING_TEXT bDrawWarning = TRUE end if end if %> <table width="100%" height="85" cellspacing="0" cellpadding="0" border="0" class="bannerName" <% if brMSIE <> g_dwBrowserType then %>bgproperties="fixed" bgcolor="#FFFFFF" background="img/gradient_tabview.png"<% end if %>> <% if brMSIE = g_dwBrowserType then %><img height="85" width="100%" src="img/gradient_tabview.png" style="position:absolute;top=0;left=0;z-index=-1"><% end if %> <tr> <td> <table width="100%" cellspacing="4" cellpadding="1" border="0"> <tr> <td width="4"> </td> <td valign="middle" align="left" width="32"> <% if bBroadcastPubPoint then if( bIsPush ) then if( FALSE = bAllowingConnections ) then %> <img src="<%= IMAGE_PP_BCASTDENY_PUSH %>" border="0" height="32" width="32"><% elseif( bInError ) then %> <img src="<%= IMAGE_PP_BCASTERR_PUSH %>" border="0" height="32" width="32" ><% elseif( FALSE = bBroadcastPPStarted ) then %> <img src="<%= IMAGE_PP_BCASTSTOP_PUSH %>" border="0" height="32" width="32"><% else %> <img src="<%= IMAGE_PP_BROADCAST_PUSH %>" border="0" height="32" width="32"><% end if elseif( bInError ) then %><img src="<%= IMAGE_PP_BROADCAST_ERR %>" border="0" height="32" width="32"><% else if( bBroadcastPPStarted ) then ' ( 0 <> ( WMS_BROADCAST_PUBLISHING_POINT_STARTED and dwPPStatus ) ) or _ ' ( 0 <> ( WMS_BROADCAST_PUBLISHING_POINT_STARTED_WITHOUT_DATA and dwPPStatus ) ) ) then if( g_bBroadcastStreamingHasEnded ) then %><img src="<%= IMAGE_PP_BROADCAST %><%' IMAGE_PP_BROADCASTENDED %>" border="0" height="32" width="32"><% elseif( bAllowingConnections ) then %><img src="<%= IMAGE_PP_BROADCAST %>" border="0" height="32" width="32"><% else %><img src="<%= IMAGE_PP_BROADCAST_DENY %>" border="0" height="32" width="32"><% end if else %><img src="<%= IMAGE_PP_BCASTSTOPPED %>" border="0" height="32" width="32"><% end if end if else ' On-Demand publishing point if( bInError ) then %><img src="<%= IMAGE_PP_ONDEMAND_ERR %>" border="0" height="32" width="32"><% else if ( bAllowingConnections ) then %><img src="<%= IMAGE_PP_ONDEMAND %>" border="0" height="32" width="32"><% else %><img src="<%= IMAGE_PP_ONDEMAND_DENY %>" border="0" height="32" width="32"><% end if end if end if %> </td> <td width="4"> </td> <td width="100%" align="left"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <% 'pp name & type %> <td valign="bottom" align="left"> <span class="bannerName"> <% if( bBroadcastPubPoint ) then dwPPType = WMS_PUBLISHING_POINT_TYPE_BROADCAST else dwPPType = WMS_PUBLISHING_POINT_TYPE_ON_DEMAND end if Response.Write( Server.HTMLEncode( ConvertPPName( g_strPubPointName, dwPPType ) ) ) if WMS_PUBLISHING_POINT_TYPE_ON_DEMAND = dwPPType then Response.Write( " " & Server.HTMLEncode( L_ONDEMANDINPARENS_TEXT ) ) elseif WMS_PUBLISHING_POINT_TYPE_BROADCAST = dwPPType then if( bIsPush ) then Response.Write( " " & Server.HTMLEncode( L_BROADCASTPUSHINPARENS_TEXT ) ) else Response.Write( " " & Server.HTMLEncode( L_BROADCASTINPARENS_TEXT ) ) end if end if %> </span> </td> <td valign="top" align="right"> </td> </tr> <tr> <% 'pp status %> <td valign="top" align="left"> <span> <%= Server.HTMLEncode( strStatusMsg ) %> </span> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr valign="bottom"> <td> <table width="100%" valign="top" cellspacing="0" cellpadding="0" border="0"> <tr> <td> <% DrawPubPointTabs strTabName %> </td> <% if( FALSE = g_bSecureConnection ) then %> <script language="JavaScript"> <!-- ShowHideSecureWarning( "img/Not_secure_32.gif" ); --> </script> <% end if %> </tr> </table> </td> </tr> </table> <!-- END BANNER --> <% end Sub '///////////////////////////////////////////////////////////////////////////////////////// sub DrawCacheProxyPPNameBanner( strTabName ) Dim dwPPType Dim strAdjustedName Dim bAllowingConnections Dim bBroadcastPubPoint Dim dwPPStatus Dim strStatusMsg Dim bInError Dim bDrawWarning if( WMS_SERVICE_STARTED <> g_dwConnectionFailureCode ) then Response.Redirect( "include/server_stopped.asp?server=" & qs("server") ) end if dwPPType = g_objPubPoint.Type strAdjustedName = Server.HTMLEncode( ConvertPPName( g_strPubPointName, dwPPType ) ) bAllowingConnections = g_objPubPoint.AllowClientsToConnect dwPPStatus = 0 strStatusMsg = "" bInError = FALSE bDrawWarning = FALSE bBroadcastPubPoint = FALSE dwPPStatus = g_objPubPoint.Status bInError = CBool( ( WMS_PUBLISHING_POINT_ERROR_CRITICAL and dwPPStatus ) )' or ( WMS_PUBLISHING_POINT_ERROR and dwPPStatus ) bBroadcastPubPoint = ( WMS_PUBLISHING_POINT_TYPE_CACHE_PROXY_BROADCAST = dwPPType ) if( bInError ) then strStatusMsg = L_PPINERROR_TEXT elseif bAllowingConnections then strStatusMsg = L_ALLOWING_TEXT else strStatusMsg = L_DENYING_TEXT bDrawWarning = TRUE end if %> <table width="100%" height="85" cellspacing="0" cellpadding="0" border="0" class="bannerName" <% if brMSIE <> g_dwBrowserType then %>bgproperties="fixed" bgcolor="#FFFFFF" background="img/gradient_tabview.png"<% end if %>> <% if brMSIE = g_dwBrowserType then %><img height="85" width="100%" src="img/gradient_tabview.png" style="position:absolute;top=0;left=0;z-index=-1"><% end if %> <tr> <td> <table width="100%" cellspacing="4" cellpadding="1" border="0"> <tr> <td width="4"> </td> <td valign="middle" align="left" width="32"> <% if bBroadcastPubPoint then if( bInError ) then %><img src="<%= IMAGE_PP_BROADCAST_ERR %>" border="0" height="32" width="32"><% else if( bAllowingConnections ) then %><img src="<%= IMAGE_PP_BROADCAST %>" border="0" height="32" width="32"><% else %><img src="<%= IMAGE_PP_BROADCAST_DENY %>" border="0" height="32" width="32"><% end if end if else ' On-Demand publishing point if( bInError ) then %><img src="<%= IMAGE_PP_ONDEMAND_ERR %>" border="0" height="32" width="32"><% else if ( bAllowingConnections ) then %><img src="<%= IMAGE_PP_ONDEMAND %>" border="0" height="32" width="32"><% else %><img src="<%= IMAGE_PP_ONDEMAND_DENY %>" border="0" height="32" width="32"><% end if end if end if %> </td> <td width="4"> </td> <td width="100%" align="left"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <% 'pp name & type %> <td valign="bottom" align="left"> <span class="bannerName"> <% if( bBroadcastPubPoint ) then dwPPType = WMS_PUBLISHING_POINT_TYPE_BROADCAST else dwPPType = WMS_PUBLISHING_POINT_TYPE_ON_DEMAND end if Response.Write( Server.HTMLEncode( ConvertPPName( g_strPubPointName, dwPPType ) ) ) %> </span> </td> <td valign="top" align="right"> </td> </tr> <tr> <% 'pp status %> <td valign="top" align="left"> <span> <%= Server.HTMLEncode( strStatusMsg ) %> </span> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr valign="bottom"> <td> <table width="100%" valign="top" cellspacing="0" cellpadding="0" border="0"> <tr> <td> <% DrawCacheProxyPubPointTabs strTabName %> </td> <% if( FALSE = g_bSecureConnection ) then %> <script language="JavaScript"> <!-- ShowHideSecureWarning( "img/Not_secure_32.gif" ); --> </script> <% end if %> </tr> </table> </td> </tr> </table> <!-- END BANNER --> <% end Sub '///////////////////////////////////////////////////////////////////////////////////////// Sub DrawServerNameBanner( strTabName ) Dim szCurrentServerName Dim bAllowNewConnections Dim strServerStatus Dim dwServerStatus if( WMS_SERVICE_STARTED <> g_dwConnectionFailureCode ) then Response.Redirect( "include/server_stopped.asp?server=" & qs("server") ) end if szCurrentServerName = g_objServer.Name dwServerStatus = g_objServer.Status bAllowNewConnections = g_objServer.AllowClientsToConnect if( bAllowNewConnections ) then strServerStatus = L_SERVICESTARTED_TEXT else strServerStatus = L_SERVERDENYINGNEWCONNECTIONS_TEXT end if on error resume next %> <!-- START BANNER --> <table valign="top" width="100%" height="85" cellspacing="0" cellpadding="0" border="0" class="bannerName" <% if brMSIE <> g_dwBrowserType then %>bgproperties="fixed" bgcolor="#FFFFFF" background="img/gradient_tabview.png"<% end if %>> <% if brMSIE = g_dwBrowserType then %><img height="85" width="100%" src="img/gradient_tabview.png" style="position:absolute;top=0;left=0;z-index=-1"><% end if %> <tr> <td> <table valign="top" width="100%" hspace="0" vspace="0" cellspacing="4" cellpadding="1" border="0" style="border-collapse: collapse" margin-top="0" margin-bottom="0"> <tr> <td width="4"> </td> <td valign="middle" align="left" width="32"> <% if WMS_SERVER_ERROR_CRITICAL and dwServerStatus then %> <img src="<%= IMAGE_SERVERERR %>" border="0" height="32" width="32"> <% elseif ( FALSE = bAllowNewConnections ) then %> <img src="<%= IMAGE_SERVERDENY %>" border="0" height="32" width="32"> <% else %> <img src="<%= IMAGE_SERVER %>" border="0" height="32" width="32"> <% end if %> </td> <td width="4"> </td> <td align="left" width="100%"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <% 'server name %> <td valign="bottom" align="left"> <span class="bannerName" nowrap> <%= Server.HTMLEncode( szCurrentServerName ) & L_DASHSERVER_TEXT %> </span> </td> <td valign="top" align="right"> </td> </tr> <tr> <% 'server status %> <td valign="top" align="left"> <span> <% if FALSE then %><img src="img\MsgBoxAlert_Warning_16.gif" valign="bottom" border="0" height="16" width="16"><% end if %><%= Server.HTMLEncode( strServerStatus ) %> </span> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr valign="bottom"> <td> <table width="100%" valign="top" cellspacing="0" cellpadding="0" border="0"> <tr> <td> <% DrawServerTabs strTabName %> </td> <% if( FALSE = g_bSecureConnection ) then %> <script language="JavaScript"> <!-- ShowHideSecureWarning( "img/Not_secure_32.gif" ); --> </script> <% end if %> </tr> </table> </td> </tr> </table> <!-- END BANNER --> <% end Sub '///////////////////////////////////////////////////////////////////////////////////////// sub DrawPPStatus( strPPStatusText, bDrawWarning ) %> <table valign="top" width="100%" height="85" cellspacing="0" cellpadding="0" border="0" class="bannerName" <% if brMSIE <> g_dwBrowserType then %>bgproperties="fixed" bgcolor="#FFFFFF" background="img/gradient_tabview.png"<% end if %>> <% if brMSIE = g_dwBrowserType then %><img height="85" width="100%" src="img/gradient_tabview.png" style="position:absolute;top=0;left=0;z-index=-1"><% end if %> <tr> <td> <table valign="top" width="80%" hspace="0" vspace="0" cellspacing="4" cellpadding="1" border="0" style="border-collapse:collapse" margin-top="0" margin-bottom="0"> <tr> <td> <tr> <td class="bannerName" nowrap> <% if TRUE = bDrawWarning then %> <img valign="center" src="img/MsgBoxAlert_Warning_16.gif" border="0" height="16" width="16"> <% end if %><%= Server.HTMLEncode( strPPStatusText ) %> </td> </tr> </td> </tr> </table> </td> </tr> </table> <% end sub '///////////////////////////////////////////////////////////////////////////////////////// sub DrawServerStatus( strServerStatusText, bDrawWarning ) %> <table valign="top" width="100%" cellspacing="0" cellpadding="0" border="0" class="bannerTable"> <tr> <td width="10"> </td> <td> <table cellspacing="1" cellpadding="0" border="0"> <tr> <td> <tr> <td nowrap> <% if TRUE = bDrawWarning then %> <img valign="center" src="img\MsgBoxAlert_Warning_16.gif" border="0" height="16" width="16"> <% end if %><%= Server.HTMLEncode( strServerStatusText ) %> </td> </tr> </td> </tr> </table> </td> </tr> </table> <% End Sub '///////////////////////////////////////////////////////////////////////////////////////// Sub DrawPluginBanner %> <table valign="top" width="100%" class="pluginheader" bgcolor="#ffffff" height="90" cellspacing="0" cellpadding="0" border="0"> <tr> <td colspan="2" class="pluginheadertext" nowrap> <%= Server.HTMLEncode( g_strServerName ) %> <% if ( "" <> g_strPubPointName ) and ( 0 < Len( g_strPubPointName ) ) then Response.Write( " (" & Server.HTMLEncode( ConvertPPName( g_strPubPointName, -1 ) ) ) & ")" end if %> </td> </tr> <tr valign="top"> <td class="pluginheadertext" nowrap> <%= Server.HTMLEncode( g_strPluginName ) %> </td> <% if( FALSE = g_bSecureConnection ) then %> <script language="JavaScript"> <!-- ShowHideSecureWarning( "img/Not_secure_32.gif" ); --> </script> <% end if %> </tr> </table> <% End Sub '///////////////////////////////////////////////////////////////////////////////////////// Sub DrawPropPageBanner( strPropPageTitle ) %> <table valign="top" width="100%" class="pluginheader" bgcolor="#ffffff" height="90" cellspacing="0" cellpadding="0" border="0"> <tr> <td colspan="2" class="pluginheadertext" nowrap> <%= Server.HTMLEncode( g_strServerName ) %> <% if ( "" <> g_strPubPointName ) and ( 0 < Len( g_strPubPointName ) ) then Response.Write( " (" & Server.HTMLEncode( ConvertPPName( g_strPubPointName, -1 ) ) ) & ")" end if %> </td> </tr> <tr valign="top"> <td class="pluginheadertext" nowrap> <%= Server.HTMLEncode( strPropPageTitle ) %> </td> </tr> </table> <% if( FALSE = g_bSecureConnection ) then %> <script language="JavaScript"> <!-- ShowHideSecureWarning( "img/Not_secure_32.gif" ); --> </script> <% end if %> <% End Sub '///////////////////////////////////////////////////////////////////////////////////////// Sub DrawCopyrightInfo() %><table valign="bottom" width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td> <!-- Copyright (C) Microsoft Corporation. All rights reserved. --> </td> </tr> </table><% End Sub %>